package com.taxi.remote;

import com.taxi.dto.Car;
import com.taxi.dto.DriverCarBindingRelationship;
import com.taxi.dto.DriverUser;
import com.taxi.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: aniu
 * @Date: 2023/9/27
 * @ClassName: ServerDriverUserClient
 * @Description: Write class functionality and purpose here.
 * @Version: 1.0
 */
@FeignClient("service-driver-user")
public interface ServerDriverUserClient {
    @PostMapping("/user")
    public Result addOrUpdateDriverUser(@RequestBody DriverUser driverUser);

    @GetMapping("/driver-user/list")
    public Result getDriverUserList(@RequestParam int page, @RequestParam int limit, @RequestParam(required = false) String address, @RequestParam(required = false) String phone);

    @PostMapping("/car")
    public Result addCar(@RequestBody Car car);

    @GetMapping("/car/list")
    public Result getCarList(@RequestParam int page, @RequestParam int limit, @RequestParam(required = false) String address, @RequestParam(required = false) String vehicleNo);

    @PostMapping("/bind")
    public Result bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);

    @PostMapping("/unbind")
    public Result unbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);
}
